/**
 * Write a description of class FormLearning here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
package amd.ui;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class PanelMenuSearchDocSimiliar extends JPanel {

    //--------------------------------------------
    //GUI Component
    //--------------------------------------------
    JLabel header = new JLabel();
    JLabel titleDoc = new JLabel();
    JLabel abstractDoc = new JLabel();
    JButton prev = new JButton();
    JButton next = new JButton();
    JButton jButtonDoc[] = new JButton[10];

    /**
     * Constructor for objects of class FormLearning
     */
    public PanelMenuSearchDocSimiliar() {
        initComponents();
        component();
    }

    public void initComponents() {
        this.setLocation(0, 200);
        this.setLayout(null);
        this.setSize(600, 600);
        this.setBackground(Color.white);
        this.setBorder(BorderFactory.createEtchedBorder());
    }
    //--------------------------------------------------------------------------

    public void component() {
        int x = 10, y = 10;

        titleDoc = GUISetting.getLabel("");//label input
        GUISetting.setLabel(titleDoc, new Rectangle(10, 10, 590, 22), "");
        abstractDoc = GUISetting.getLabel("");//label input
        GUISetting.setLabel(abstractDoc, new Rectangle(10, 10, 590, 22), "");

        header = GUISetting.getLabel("List Dokumen Similar");//label input
        GUISetting.setLabel(header, new Rectangle(10, 10, 590, 22), "");//set label input

        jButtonDoc[0] = GUISetting.getButton("", "doc1", buttonListener);
        jButtonDoc[1] = GUISetting.getButton("", "doc2", buttonListener);
        jButtonDoc[2] = GUISetting.getButton("", "doc3", buttonListener);
        jButtonDoc[3] = GUISetting.getButton("", "doc4", buttonListener);
        jButtonDoc[4] = GUISetting.getButton("", "doc5", buttonListener);
        jButtonDoc[5] = GUISetting.getButton("", "doc6", buttonListener);
        jButtonDoc[6] = GUISetting.getButton("", "doc7", buttonListener);
        jButtonDoc[7] = GUISetting.getButton("", "doc8", buttonListener);
        jButtonDoc[8] = GUISetting.getButton("", "doc9", buttonListener);
        jButtonDoc[9] = GUISetting.getButton("", "doc10", buttonListener);



        prev = GUISetting.getButton("Prev", "prev", buttonListener);
        next = GUISetting.getButton("Next", "next", buttonListener);

        y = y + 25;
        for (int i = 0; i < 10; i++) {
            GUISetting.setButton(jButtonDoc[i], new Rectangle(x, y, 590, 22), "");
            y = y + 40;
        }
        for (int i = 0; i < 10; i++) {
            jButtonDoc[i].setBorder(null);
            jButtonDoc[i].setBackground(Color.white);
        }
        GUISetting.setButton(prev, new Rectangle(x, y + 25, 100, 22), "");
        GUISetting.setButton(next, new Rectangle(x + 150, y + 25, 100, 22), "");

        this.add(header);
        this.add(prev);
        this.add(next);

        for (int i = 0; i < 10; i++) {
            this.add(jButtonDoc[i]);
        }


    }
    //--------------------------------------------------------------------------
    //Action Listener untuk textFiled
    //--------------------------------------------------------------------------

    //--------------------------------------------------------------------------
    //Action Listener untuk Button
    //--------------------------------------------------------------------------
    ActionListener buttonListener = new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            String command = e.getActionCommand();
            if (command.equals("doc1")) {
            } else if (command.equals("doc2")) {

            } else if (command.equals("doc3")) {

            } else if (command.equals("doc4")) {

            } else if (command.equals("doc5")) {

            } else if (command.equals("doc6")) {

            } else if (command.equals("doc7")) {

            } else if (command.equals("doc8")) {

            } else if (command.equals("doc9")) {

            } else if (command.equals("doc10")) {

            } else if (command.equals("prev")) {

            } else if (command.equals("next")) {

            }
        }
    };
}


        
